package com.my.attendance.service;

import com.my.attendance.dao.ZhiChengDao;
import com.my.attendance.entity.Position;

import java.util.List;

public class ZhiChengService {
    private ZhiChengDao zhiChengDao=new ZhiChengDao();

    public List<Position> ListZhiCheng() throws Exception {
        return zhiChengDao.ListZhiCheng();
    }

    public void addPos(Position p) throws Exception {
        zhiChengDao.addPos(p);
    }


    public int addPosPre() throws Exception {
        String s = zhiChengDao.addPosPre();
        return Integer.parseInt(s);
    }

    public void del(String position_number) throws Exception {
        zhiChengDao.del(position_number);
    }

    public void update(Position p) throws Exception {
        zhiChengDao.update(p);
    }

    public Position getZhiCheng(String position_number) throws Exception {
        return zhiChengDao.getZhiCheng(position_number);
    }
}
